1. Field of the Invention
The present invention relates to a processing apparatus having a memory for storing contents, for example, a processing apparatus having an internal memory for storing internal contents consisting of programs and the like, to which an external memory for storing external contents such as programs and data is detachably mounted, said processing apparatus being for performing a processing according to the internal contents stored in the internal memory and the external contents stored in the external memory, a contents check method of determining validity of the external contents stored in the external memory in the processing apparatus, and a contents renewal method of renewing a module which is a part of the external contents stored in the external memory in the processing apparatus.
2. Description of the Related Art
Hitherto, in an apparatus for performing a processing using LSI chips including CPU, there is known an arrangement in which an internal memory such as ROM and the like is loaded in an LSI chip so that a program, which is universal or less in possibility of renewal, is stored in the internal memory, and an external memory (for example, ROM and flash ROM) is detachable mounted on the LSI chip so that after forwarding of the apparatus, an application program and various sorts of data can be rewritten, and the application program and various sorts of data are stored in the external memory so as to be processed.
However, the apparatus as mentioned above is associated with such a problem that when contents such as programs and data stored in the external memory are unfairly rewritten, or when the external memory is replaced by another memory storing unfair contents, a malicious program is executed, or alternatively even if the program is proper per se, an erroneous processing is performed in accordance with a malicious data.
For example, in the event that the external memory (ROM) of the above-mentioned apparatus loaded on a financial terminal apparatus is unfairly obtained to read a program stored in the external memory through the reverse engineering, and a program code unfairly outputting or storing an entered personal identification number is added in a personal identification number input module in the program so as to be stored in the same type of ROM, and then the ROM is returned to the financial terminal apparatus, it is possible to steal the personal identification number without being noticed by a user.
In view of the foregoing, it is an object of the present invention to provide a processing apparatus capable of avoiding an execution of an unfair program and an execution of an unfair processing due to an unfair data, a contents check method of checking validity of contents stored in a memory, and a contents renewal method capable of preventing an unfair renewal of contents stored in a memory.
To achieve the above-mentioned objects of the present invention, the present invention provides a contents check method in a processing apparatus having a memory storing contents for performing a processing according to the contents stored in said memory, the contents check method deciding validity of the contents stored in said memory,
wherein the contents stored in said memory involve original check result information representative of a check result associated with validity of the contents and original check result position information representative of a storage position of the original check result information, said contents check method comprising:
a check step of checking the contents stored in said memory in accordance with a predetermined check algorithm to obtain a check result; and
a comparison step of comparing the check result obtained by said check step with a check result represented by the original check result information stored in a storage position indicated by the original check result position information to decide validity of the contents stored in said memory.
According to the contents check method of the present invention as mentioned above, the contents stored in the memory involve not only the original check result information, but also the original check result position information. This feature makes it possible to reduce a possibility that the original check result information is unfairly known by a third person, as compared with a case where the original check result information is stored in a fixed address. Further, according to the contents check method of the present invention as mentioned above, it is possible to properly decide validity of the contents stored in the memory and thereby effectively preventing unfair program and data from being entered forcibly.
Here, the contents check method of the present invention has typically the following aspects.
That is, to achieve the above-mentioned objects of the present invention, the present invention provides a contents check method in a processing apparatus having an internal memory storing internal contents wherein an external memory for storing external contents is detachably mounted on said processing apparatus, for performing a processing according to the internal contents stored in said internal memory and the external contents stored in said external memory, the contents check method deciding validity of the external contents stored in said external memory,
wherein the external contents stored in said external memory involve original check result information representative of a check result associated with validity of the external contents and original check result position information representative of a storage position of the original check result information, said contents check method comprising:
a check step of checking the external contents stored in said external memory in accordance with a predetermined check algorithm to obtain a check result; and
a comparison step of comparing the check result obtained by said check step with a check result represented by the original check result information stored in a storage position indicated by the original check result position information to decide validity of the external contents stored in said external memory.
According to the contents check method of the present invention as mentioned above, as mentioned above, the contents stored in the memory involve not only the original check result information, but also the original check result position information. This feature makes it possible to reduce a possibility that the original check result information is unfairly known by a third person, as compared with a case where the original check result information is stored in a fixed address. Further, according to the contents check method of the present invention as mentioned above, it is possible to properly decide validity of the contents stored in the memory and thereby effectively preventing unfair program and data from being entered forcibly.
In the contents check method according to the present invention as mentioned above, it is preferable that the external contents stored in said external memory involve the original check result information and the original check result position information at least one of which is encoded, said contents check method further comprising:
a decoding step of decoding one encoded of the original check result information and the original check result position information.
This feature makes it possible to further reduce a possibility that the original check result information and the storage place are unfairly known by a third person.
In the contents check method according to the present invention as mentioned above, it is preferable that the external contents stored in said external memory involve check area designation information, and
said check step checks an check area designated by the check area designation information of the external contents stored in said external memory.
This feature makes it possible to properly decide validity of contents stored in the external memory upon ensuring an rewritable area on the external memory by a user.
In this case, it is preferable that the external contents stored in said external memory involve the check area designation information which is encoded, said contents check method further comprising:
a decoding step of decoding the encoded check area designation information.
This feature makes it possible to prevent unfair contents from being entered forcibly, since it is difficult to identify the check area.
To achieve the above-mentioned objects of the present invention, the present invention provides a contents renewal method in a processing apparatus having a memory storing contents for performing a processing according to the contents stored in said memory, the contents renewal method renewing a module to be renewed, which is part of the contents stored in said memory, into a new renewal module,
wherein the contents stored in said memory involve original check result information representative of a check result associated with validity of the contents and original module check result information representative of a check result associated with validity of the renewal module, said contents renewal method comprising:
a module check step of checking the renewal module in accordance with a predetermined check algorithm to obtain a check result;
a comparison step of comparing the check result obtained by said module check step with a check result represented by the original module check result information involved in the renewal module to decide validity of the renewal module;
a correction data producing step of producing correction data in such a manner that a check result, in a case where the contents stored in said memory after the module to be renewed of the contents stored in said memory is renewed into the renewal module involving correction data is checked in accordance with a predetermined algorithm, is coincident with the check result represented by the original check result information involved in the contents; and
a module renewal step of renewing the module to be renewed of the contents stored in said memory into the renewal module involving the correction data produced in said correction data producing step in a case where said module check step decides that the renewal module is proper.
According to the program renewal method of the present invention as mentioned above, the combination of the module check step and the module renewal step makes it possible to decide validity of the renewal module.
When the module to be renewed is replaced by a renewal module, the check result of the contents is changed. To cope with this, it is considered that when the module to be renewed is renewed into a renewal module, the original check result information of the contents stored in the memory is rewritten when the module to be renewed is renewed into the renewal module. However, such a renewal needs a rewriting of the original check result information every renewal. This is associated with a high possibility that a storage address of the original check result information is known by an unfair observer of the access of the contents.
On the contrary, according to the present invention, correction data is produced in the correction data producing step, and the correction data is written together with the renewal module on the memory. Thus, there is no need to rewrite the original check result information of the contents which are stored in the memory, and thereby greatly reduce danger that the storage place of the original check result information is unfairly known.
Here, the contents renewal method of the present invention has typically the following aspects.
That is, to achieve the above-mentioned objects of the present invention, the present invention provides a contents renewal method in a processing apparatus having an internal memory storing internal contents wherein an external memory for storing external contents is detachably mounted on said processing apparatus, for performing a processing according to the internal contents stored in said internal memory and the external contents stored in said external memory, the contents renewal method renewing a module to be renewed, which is part of the contents stored in said external memory, into a new renewal module,
wherein the contents stored in said external memory involve original check result information representative of a check result associated with validity of the external contents and original module check result information representative of a check result associated with validity of the renewal module, said contents renewal method comprising:
a module check step of checking the renewal module in accordance with a predetermined check algorithm to obtain a check result;
a comparison step of comparing the check result obtained by said module check step with a check result represented by the original module check result information involved in the renewal module to decide validity of the renewal module;
a correction data producing step of producing correction data in such a manner that a check result, in a case where the external contents stored in said external memory after the module to be renewed of the external contents stored in said external memory is renewed into the renewal module involving correction data is checked in accordance with a predetermined algorithm, is coincident with the check result represented by the original check result information involved in the external contents; and
a module renewal step of renewing the module to be renewed of the external contents stored in said external memory into the renewal module involving the correction data produced in said correction data producing step in a case where said module check step decides that the renewal module is proper.
According to the program renewal method of the present invention as mentioned above, the combination of the module check step and the module renewal step makes it possible to decide validity of the renewal module.
When the module to be renewed is replaced by a renewal module, the check result of the external contents is changed. To cope with this, it is considered that when the module to be renewed is renewed into a renewal module, the original check result information of the external contents stored in the external memory is rewritten when the module to be renewed is renewed into the renewal module. However, such a renewal needs a rewriting of the original check result information every renewal. This is associated with a high possibility that a storage address of the original check result information is known by an unfair observer of the access of the contents.
On the contrary, according to the present invention, correction data is produced in the correction data producing step, and the correction data is written together with the renewal module on the external memory. Thus, there is no need to rewrite the original check result information of the external contents which are stored in the external memory, and thereby greatly reduce danger that the storage place of the original check result information is unfairly known.
In the contents renewal method according to the present invention as mentioned above, it is preferable that the renewal module involves the original module check result information which is encoded, said contents renewal method further comprising:
a decoding step of decoding the encoded original module check result information.
This feature makes it possible to effectively prevent an unfair module from being entered forcibly.
In this case, it is preferable that the external contents stored in said external memory involve a key for decoding the encoded original module check result information, and
said decoding step decodes the encoded original module check result information by said key.
Further, it is preferable that the external contents stored in said external memory involve the key which is encoded,
said decoding step decodes the encoded original module check result information with the key which is read from said external memory and is decoded.
This feature makes it further difficult that the unfair module enters forcibly.
To achieve the above-mentioned objects of the present invention, the present invention provides a first processing apparatus having a memory storing contents for performing a processing according to the contents stored in said memory,
wherein the contents stored in said memory involve original check result information representative of a check result associated with validity of the contents and original check result position information representative of a storage position of the original check result information, said processing apparatus comprising:
a check section for checking the contents stored in said memory in accordance with a predetermined check algorithm to obtain a check result; and
a comparison section for comparing the check result obtained by said check section with a check result represented by the original check result information stored in a storage position indicated by the original check result position information to decide validity of the contents stored in said memory.
Here, the first processing apparatus of the present invention has typically the following aspects.
That is, to achieve the above-mentioned objects of the present invention, the present invention provides a first processing apparatus having an internal memory storing internal contents wherein an external memory for storing external contents is detachably mounted on said processing apparatus, for performing a processing according to the internal contents stored in said internal memory and the external contents stored in said external memory,
wherein the external contents stored in said external memory involve original check result information representative of a check result associated with validity of the external contents and original check result position information representative of a storage position of the original check result information, said processing apparatus comprising:
a check section for checking the external contents stored in said external memory in accordance with a predetermined check algorithm to obtain a check result; and
a comparison section for comparing the check result obtained by said check section with a check result represented by the original check result information stored in a storage position indicated by the original check result position information to decide validity of the external contents stored in said external memory.
In the first processing apparatus according to the present invention as mentioned above, it is preferable that the external contents stored in said external memory involve the original check result information and the original check result position information at least one of which is encoded, said processing apparatus further comprising:
a decoding section for decoding one encoded of the original check result information and the original check result position information.
Further, in the first processing apparatus according to the present invention as mentioned above, it is preferable that the external contents stored in said external memory involve check area designation information, and
said check section checks an check area designated by the check area designation information of the external contents stored in said external memory.
In this case, it is preferable that the external contents stored in said external memory involve the check area designation information which is encoded, said processing apparatus further comprising:
a decoding section for decoding the encoded check area designation information.
To achieve the above-mentioned objects of the present invention, the present invention provides a second processing apparatus having a memory storing contents for performing a processing according to the contents stored in said memory,
wherein the contents stored in said memory involve original check result information representative of a check result associated with validity of the contents, said processing apparatus comprising:
a renewal module obtaining section for obtaining a renewal module involving original module check result information representative of a check result associated with validity of the renewal module, said renewal module being to be substituted for a module to be renewed which is part of the contents stored in said memory;
a module check section for checking the renewal module obtained in said renewal module obtaining section in accordance with a predetermined check algorithm to obtain a check result;
a comparison section for comparing the check result obtained by said module check step with a check result represented by the original module check result information involved in the renewal module to decide validity of the renewal module;
a correction data producing section for producing correction data in such a manner that a check result, in a case where the contents stored in said memory after the module to be renewed of the contents stored in said memory is renewed into the renewal module involving correction data is checked in accordance with a predetermined algorithm, is coincident with the check result represented by the original check result information involved in the contents; and
a module renewal section for renewing the module to be renewed of the contents stored in said memory into the renewal module involving the correction data produced in said correction data producing section in a case where said module check step decides that the renewal module is proper.
Here, the second processing apparatus of the present invention has typically the following aspects.
That is, to achieve the above-mentioned objects of the present invention, the present invention provides a second processing apparatus having an internal memory storing internal contents wherein an external memory for storing external contents is detachably mounted on said processing apparatus, for performing a processing according to the internal contents stored in said internal memory and the external contents stored in said external memory,
wherein the external contents stored in said external memory involve original check result information representative of a check result associated with validity of the external contents, said processing apparatus comprising:
a renewal module obtaining section for obtaining a renewal module involving original module check result information representative of a check result associated with validity of the renewal module, said renewal module being to be substituted for a module to be renewed which is part of the external contents stored in said memory;
a module check section for checking the renewal module in accordance with a predetermined check algorithm to obtain a check result;
a comparison section for comparing the check result obtained by said module check section with a check result represented by the original module check result information involved in the renewal module to decide validity of the renewal module;
a correction data producing section for producing correction data in such a manner that a check result, in a case where the external contents stored in said external memory after the module to be renewed of the external contents stored in said external memory is renewed into the renewal module involving correction data is checked in accordance with a predetermined algorithm, is coincident with the check result represented by the original check result information involved in the external contents; and
a module renewal section for renewing the module to be renewed of the external contents stored in said external memory into the renewal module involving the correction data produced in said correction data producing step in a case where said module check step decides that the renewal module is proper.
In the second processing apparatus according to the present invention as mentioned above, it is preferable that the renewal module involves the original module check result information which is encoded, said processing apparatus further comprising:
a decoding section for decoding the encoded original module check result information.
In this case, it is preferable that the external contents stored in said external memory involve a key for decoding the encoded original module check result information, and
said decoding section decodes the encoded original module check result information by said key.
Further, in this case, it is preferable that the external contents stored in said external memory involve the key which is encoded,
said decoding section decodes the encoded original module check result information with the key which is read from said external memory and is decoded.